<!DOCTYPE html>
<html>

<head>
    <include file="Share:meta" />
    <style type="text/css">
    .trstyle0 {
        background-color: #e8e8e8;
    }
    </style>
</head>

<body class="hold-transition skin-blue sidebar-mini">
    <div class="wrapper">
        <include file="Share:header" />
        <include file="Share:left" />
        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">
                <h1>顾客列表<small><a target="_blank"></a></small></h1>
                <ol class="breadcrumb">
                    <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
                    <li class="active">顾客列表</li>
                </ol>
            </section>
            <!-- Main content -->
            <section class="content">
                <div class="box">
                    <div class="box-header with-border">
                        <h3 class="box-title">列表</h3>
                        <div class="box-tools">
                            <form action="__APP__/Admin/Customer/clist/" method="GET" role="form">
                                <div class="input-group input-group-sm" style="width: 450px;">
                                    <input type="text" name="name" class="form-control pull-right" style="width:150px; float: right;" placeholder="Search" value="{$Think.get.name}">
                                    <select name="key" id="keyinput" class="form-control" required="required" style="width:100px; float: right;">
                                        <option value="name">姓名</option>
                                        <option value="company">公司名称</option>
                                        <option value="mobile">电话</option>
                                        <option value="cid">序号</option>
                                    </select>
                                    <div class="input-group-btn">
                                        <button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
                                    </div>
                                    <script type="text/javascript">
                                    $('#keyinput').val('{$Think.get.key}');
                                    </script>
                                </div>
                            </form>
                        </div>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <table class="table table-bordered HjTable" border="1">
                            <tbody>
                                <tr style="background-color: #E6E6FA;">
                                    <th style="width: 5%;">序号</th>
                                    <th style="width: 10%;">头像</th>
                                    <th style="width: 20%;">名片信息</th>
                                    <th style="width: 16%;">二维码</th>
                                    <th style="width: 15%;">业绩分成上级</th>
                                    <th style="width: 12%;">扩展</th>
                                    <th style="width: 8%"><a class="btn btn-success" href="__APP__/Admin/Customer/clist/opt/add" role="button">新增</a></th>
                                </tr>
                                <notempty name="list">
                                    <volist name="list" id="vo">
                                        <tr class='trstyle{$vo.status}'>
                                            <td>{$vo.cid}</td>
                                            <td><img src='{$vo.Avatar}' width='72' onerror="this.src='../Public/images/error.png';" /></td>
                                            <td>
                                                <p><b>手机：{$vo.mobile}</b></p>
                                                <p><b>名称：{$vo.name}</b></p>
                                                <p class="desc">公司：{$vo.company}</p>
                                                <p class="desc">创建时间：{$vo.ctime}</p>
                                                <p class="desc">余额：{$vo.money}</p>
                                                <p class="desc">积分：{$vo.point}</p>
                                            </td>
                                            <td>
                                                <center><img title="如果图片无法下载，请刷新页面。" style="max-width: 180px;" src="{$vo.qrcode}" onerror="this.src='../Public/images/error.png';"></center>
                                            </td>
                                            <td>
                                                <p><b>代理商名称：<br>{$vo.csl_user_name}</b></p>
                                                <p>代理商账号：<br>{$vo.csl_user_username}</p>
                                                <p>消费者上级ID：{$vo.parentcid}</p>
                                                <a class="btn btn-default" target="_blank" href="__APP__/Admin/Customer/clist/cid/{$vo.parentcid}/opt/edit" role="button">查看消费者上级</a>
                                            </td>
                                            <td>
                                                <eq name="vo.pay_two_code" value="">
                                                    <else />
                                                    <img src='{$vo.pay_two_code}' width='92' />
                                                </eq>
                                                <label title="支付二维码" for="inputImage" class="btn btn-info">
                                                    <i class="fa fa-upload"></i>
                                                    <a href="__APP__/Admin/Customer/uploadTwoCode/opt/up/cid/{$vo.cid}" style="color: #fff;">支付二维码</a>
                                                </label>
                                                <br>
                                                <br>
                                                <a class="btn btn-default" href="__APP__/Admin/Customer/clist/cid/{$vo.cid}/opt/introduction" role="button">公司简介</a>
                                            </td>
                                            <td><a class="btn btn-info" href="__APP__/Admin/Customer/clist/cid/{$vo.cid}/opt/edit" role="button">详细</a>
                                                <br/>
                                                <br/>
                                                <a class="btn btn-danger" onClick="if(confirm('确认删除')){return true}else{return false}" href="__APP__/Admin/Customer/clist/cid/{$vo.cid}/opt/delete" role="button">删除</a>
                                            </td>
                                        </tr>
                                    </volist>
                                    <else />
                                    <tr class='trstyle{$vo.status}'>
                                        <td colspan="9">没有找到相关记录</td>
                                    </tr>
                                </notempty>
                            </tbody>
                        </table>
                    </div>
                    <!-- /.box-body -->
                    <div class="box-footer clearfix">
                        <ul class="pagination pagination-sm no-margin pull-right">
                            {$show}
                        </ul>
                    </div>
                </div>
            </section>
            <!-- /.content -->
        </div>
        <!-- /.content-wrapper -->
        <include file="Share:copyright" />
        <include file="Share:setting" />
    </div>
    <include file="Share:js" />
    <script type="text/javascript">
    $("#CustomerManager").addClass("active");
    $("#customer_list").addClass("active");

    /* function deleteData($uid){
         if (confirm("确定删除?")){
             location.href = "/Customer/clist/cid/"+$uid+"/opt/delete";
         }
     }*/
    </script>
</body>

</html>
